package com.gxuwz.check.util;


import com.gxuwz.check.base.BaseDao;
import com.gxuwz.check.model.entity.SysUserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate4.HibernateTemplate;

public class Test{

    @Autowired
    private HibernateTemplate hibernateTemplate;

    public HibernateTemplate getHibernateTemplate() {
        return hibernateTemplate;
    }

    public void main1() {
        for (int i = 0 ; i < 20 ; i ++){
            SysUserEntity sysUserEntity = new SysUserEntity(i,"老师"+i,"123456"+i,2);
            getHibernateTemplate().save(sysUserEntity);
        }
    }

    public static void main(String[] args) {
        Test test = new Test();
        test.main1();
    }

}